<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <script>
    /*
    isNaN判断是否为数字，是则整数化，否则求字符串长度，最终进行比较
    */
    var maximum = function (strs) {
      let max = 0;
      for (let item of strs) {
        let temp = 0;
        if (isNaN(item)) {
          temp = item.length;
        } else {
          temp = parseInt(item);
        }
        max = temp > max ? temp : max;
      }
      return max;
    };
    console.log(maximum(["alic3", "bob", "3", "4", "00000"]))
  </script>
</body>

</html>